﻿import unittest
from selenium import webdriver
import os

class _tcBase(object):
    """Родитель для всех кейсов"""

    def setUp(self):
        self.driver = webdriver.Ie()
        self.driver.maximize_window()

    def setUpChrome(self):
        """
        options = webdriver.ChromeOptions()
        options.add_experimental_option("excludeSwitches", ["ignore-certificate-errors"])
        self.driver = webdriver.Chrome(chrome_options=options)
        """
        self.driver = webdriver.Chrome()
        self.driver.maximize_window()

    def setUpFireFox(self):
        self.driver = webdriver.Firefox()
        self.driver.maximize_window()

    def tearDown(self):
        self.driver.close()

    #Очистить кеш браузера IE
    def clear_ie_cache(self):
        os.system("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2")
